package com.eshop.modules.system.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("dict_detail")
public class DictDetail extends BaseDomain
{
    @TableId
    private Long id;
    private String label;
    private String value;
    private String sort;
    private Long dictId;
    @TableField(exist = false)
    private Dict dict;
    
    public void copy(final DictDetail source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getId() {
        return this.id;
    }
    
    public String getLabel() {
        return this.label;
    }
    
    public String getValue() {
        return this.value;
    }
    
    public String getSort() {
        return this.sort;
    }
    
    public Long getDictId() {
        return this.dictId;
    }
    
    public Dict getDict() {
        return this.dict;
    }
    
    public void setId(final Long id) {
        this.id = id;
    }
    
    public void setLabel(final String label) {
        this.label = label;
    }
    
    public void setValue(final String value) {
        this.value = value;
    }
    
    public void setSort(final String sort) {
        this.sort = sort;
    }
    
    public void setDictId(final Long dictId) {
        this.dictId = dictId;
    }
    
    public void setDict(final Dict dict) {
        this.dict = dict;
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof DictDetail)) {
            return false;
        }
        final DictDetail other = (DictDetail)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        Label_0065: {
            if (this$id == null) {
                if (other$id == null) {
                    break Label_0065;
                }
            }
            else if (this$id.equals(other$id)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$dictId = this.getDictId();
        final Object other$dictId = other.getDictId();
        Label_0102: {
            if (this$dictId == null) {
                if (other$dictId == null) {
                    break Label_0102;
                }
            }
            else if (this$dictId.equals(other$dictId)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$label = this.getLabel();
        final Object other$label = other.getLabel();
        Label_0139: {
            if (this$label == null) {
                if (other$label == null) {
                    break Label_0139;
                }
            }
            else if (this$label.equals(other$label)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$value = this.getValue();
        final Object other$value = other.getValue();
        Label_0176: {
            if (this$value == null) {
                if (other$value == null) {
                    break Label_0176;
                }
            }
            else if (this$value.equals(other$value)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$sort = this.getSort();
        final Object other$sort = other.getSort();
        Label_0213: {
            if (this$sort == null) {
                if (other$sort == null) {
                    break Label_0213;
                }
            }
            else if (this$sort.equals(other$sort)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$dict = this.getDict();
        final Object other$dict = other.getDict();
        if (this$dict == null) {
            if (other$dict == null) {
                return true;
            }
        }
        else if (this$dict.equals(other$dict)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof DictDetail;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * 59 + (($id == null) ? 43 : $id.hashCode());
        final Object $dictId = this.getDictId();
        result = result * 59 + (($dictId == null) ? 43 : $dictId.hashCode());
        final Object $label = this.getLabel();
        result = result * 59 + (($label == null) ? 43 : $label.hashCode());
        final Object $value = this.getValue();
        result = result * 59 + (($value == null) ? 43 : $value.hashCode());
        final Object $sort = this.getSort();
        result = result * 59 + (($sort == null) ? 43 : $sort.hashCode());
        final Object $dict = this.getDict();
        result = result * 59 + (($dict == null) ? 43 : $dict.hashCode());
        return result;
    }
    
    public String toString() {
        return "DictDetail(id=" + this.getId() + ", label=" + this.getLabel() + ", value=" + this.getValue() + ", sort=" + this.getSort() + ", dictId=" + this.getDictId() + ", dict=" + this.getDict() + ")";
    }
}
